package com.example.mapper;

import com.example.entity.Shoucang;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ShangpinMapper {

    List<Shoucang> findAll(@Param("name") String name, @Param("typeId") Integer typeId);

    @Delete("delete from shoucang where id = #{value}")
    void delete(Integer id);

    @Select("select * from shoucang where id=#{value}")
    Shoucang getById(Integer id);

    void update(Shoucang shoucang);

    Shoucang findOneByProductId(Integer goodsId);
}
